Probabilistic error correction in multi-bit-per-cell flash memory

ABSTRACT

Data that are stored in cells of a multi-bit-per cell memory, according to a systematic or non-systematic ECC, are read and corrected (systematic ECC) or recovered (non-systematic ECC) in accordance with estimated probabilities that one or more of the read bits are erroneous. In one method of the present invention, the estimates are a priori. In another method of the present invention, the estimates are based only on aspects of the read bits that include significances or bit pages of the read bits. In a third method of the present invention, the estimates are based only on values of the read bits. Not all the estimates are equal.

The above-referenced patent application is a Divisional application ofU.S. patent Ser. No. 11/339,571, filed on Jan. 26, 2006, and also claimspriority under 37 U.S.C. § 119(e) of U.S. Provisional Application No.60/726,817 filed on Oct. 17, 2005.

FIELD AND BACKGROUND OF THE INVENTION

The present invention relates to error correction of digital data and,more particularly, to a method of error correction for flash memorydevices that store multiple bits per cell.

Flash memory devices have been known for many years. Typically, eachcell within a flash memory stores one bit of information. Traditionally,the way to store a bit has been by supporting two states of the cell—onestate represents a logical “0” and the other state represents a logical“1”. In a flash memory cell the two states are implemented by having afloating gate above the cell's channel (the area connecting the sourceand drain elements of the cell's transistor), and having two validstates for the amount of charge stored within this floating gate.Typically, one state is with zero charge in the floating gate and is theinitial unwritten state of the cell after being erased (commonly definedto represent the “1” state) and another state is with some amount ofnegative charge in the floating gate (commonly defined to represent the“0” state). Having negative charge in the gate causes the thresholdvoltage of the cell's transistor (i.e. the voltage that has to beapplied to the transistor's control gate in order to cause thetransistor to conduct) to increase. Now it is possible to read thestored bit by checking the threshold voltage of the cell: if thethreshold voltage is in the higher state then the bit value is “0” andif the threshold voltage is in the lower state then the bit value is“1”. Actually there is no need to accurately read the cell's thresholdvoltage. All that is needed is to correctly identify in which of the twostates the cell is currently located. For that purpose it is enough tomake a comparison against a reference voltage value that is in themiddle between the two states, and thus to determine if the cell'sthreshold voltage is below or above this reference value.

FIG. 1A shows graphically how this works. Specifically, FIG. 1A showsthe distribution of the threshold voltages of a large population ofcells. Because the cells in a flash memory are not exactly identical intheir characteristics and behavior (due, for example, to smallvariations in impurities concentrations or to defects in the siliconstructure), applying the same programming operation to all the cellsdoes not cause all of the cells to have exactly the same thresholdvoltage. (Note that, for historical reasons, writing data to a flashmemory is commonly referred to as “programming” the flash memory.)Instead, the threshold voltage is distributed similar to the way shownin FIG. 1A. Cells storing a value of “1” typically have a negativethreshold voltage, such that most of the cells have a threshold voltageclose to the value shown by the left peak of FIG. 1A, with some smallernumbers of cells having lower or higher threshold voltages. Similarly,cells storing a value of “0” typically have a positive thresholdvoltage, such that most of the cells have a threshold voltage close tothe value shown by the right peak of FIG. 1A, with some smaller numbersof cells having lower or higher threshold voltages.

In recent years a new kind of flash memory has appeared on the market,using a technique conventionally called “Multi Level Cells” or MLC forshort. (This nomenclature is misleading, because the previous type offlash cells also have more than one level: they have two levels, asdescribed above. Therefore, the two kinds of flash cells are referred toherein as “Single Bit Cells” (SBC) and “Multi-Bit Cells” (MBC).) Theimprovement brought by the MBC flash is the storing of two or more bitsin each cell. In order for a single cell to store two bits ofinformation the cell must be able to be in one of four different states.As the cell's “state” is represented by its threshold voltage, it isclear that a 2-bit MBC cell should support four different valid rangesfor its threshold voltage. FIG. 1B shows the threshold voltagedistribution for a typical 2-bit MBC cell. As expected, FIG. 1B has fourpeaks, each corresponding to one state. As for the SBC case, each stateis actually a range and not a single number. When reading the cell'scontents, all that must be guaranteed is that the range that the cell'sthreshold voltage is in is correctly identified. For a prior art exampleof an MBC flash memory see U.S. Pat. No. 5,434,825 to Harari.

Similarly, in order for a single cell to store three bits of informationthe cell must be able to be in one of eight different states, So a 3-bitMBC cell should support eight different valid ranges for its thresholdvoltage. FIG. 1C shows the threshold voltage distribution for a typical3-bit MBC cell. As expected, FIG. 1C has eight peaks, each correspondingto one state. FIG. 1D) shows the threshold voltage distribution for a4-bit MBC cell, for which sixteen states, represented by sixteenthreshold voltage ranges, are required.

When encoding two bits in an MBC cell via the four states, it is commonto have the left-most state in FIG. 1B (typically having a negativethreshold voltage) represent the case of both bits having a value of“1”. (In the discussion below the following notation is used—the twobits of a cell are called the “lower bit” and the “upper bit”. Anexplicit value of the bits is written in the form [“upper bit” “lowerbit”], with the lower bit value on the right. So the case of the lowerbit being “0” and the upper bit being “1” is written as “10”. One mustunderstand that the selection of this terminology and notation isarbitrary, and other names and encodings are possible). Using thisnotation, the left-most state represents the case of “11”. The otherthree states are typically assigned by the following order from left toright: “10”, “00”, “01”. One can see an example of an implementation ofan MBC NAND flash memory using this encoding in U.S. Pat. No. 6,522,580to Chen, which patent is incorporated by reference for all purposes asif fully set forth herein. See in particular FIG. 8 of the Chen patent.U.S. Pat. No. 6,643,188 to Tanaka also shows a similar implementation ofan MBC NAND flash memory, but see FIG. 7 there for a differentassignment of the states to bit encodings: “11”, “10”, “01”, “00”. TheChen encoding is the one illustrated in FIG. 1B.

We extend the above terminology and notation to the cases of more thantwo bits per cell, as follows. The left-most unwritten state represents“all ones” (“1 . . . 1”), the string “1 . . . 10” represents the case ofonly the lowest bit of the cell being written to “0”, and the string “01. . . 1” represents the case of only the most upper bit of the cellbeing written to “0”.

When reading an MBC cell's content, the range that the cell's thresholdvoltage is in must be identified correctly; only in this case thiscannot always be achieved by comparing, to only one reference voltage.Instead, several comparisons may be necessary. For example, in the caseillustrated in FIG. 1B, to read the lower bit, the cell's thresholdvoltage first is compared to a reference comparison voltage V₁ and then,depending on the outcome of the comparison, to either a zero referencecomparison voltage or a reference comparison voltage V₂. Alternatively,the lower bit is read by unconditionally comparing the threshold voltageto both a zero reference voltage and a reference comparison voltage V₂,again requiring two comparisons. For more than two bits per cell, evenmore comparisons might be required.

The bits of a single MBC cell may all belong to the same flash page, orthey may be assigned to different pages so that, for example in a 4-bitcell, the lowest bit is in page 0, the next bit is in page 1, the nextbit in page 2, and the highest bit is in page 3. (A page is the smallestportion of data that can be separately written in a flash memory).

Lasser, U.S. patent application Ser. No. 11/035,807, deals with methodsof encoding bits in flash memory cells storing multiple bits per cell.Lasser, U.S. patent application Ser. No. 11/061,634, and Murin, U.S.patent application Ser. No. 11/078,478, deal with the implications ofthose methods of bits encoding on the question of error distributionacross different logical pages of multi-bit flash cells. Specifically,Lasser '634 teaches a method for achieving even distribution of errorsacross different logical pages, as seen by the user of the data and asdealt with by the Error Correction Code (ECC) circuitry, using alogical-to-physical mapping of bit encodings; and Murin teaches a methodfor achieving even distribution of errors across different logicalpages, as seen by the user of the data and as dealt with by the ECCcircuitry, using interleaving of logical pages between physical bitpages. All three of these prior art patent applications are incorporatedby reference for all purposes as if fully set forth herein.

Both Lasser '634 and Murin address the same goal: reducing the errorrate for which the ECC circuitry should be designed. In the examplepresented in both applications a group of 15,000 4-bit MBC flash memorycells is used for storing 4 logical pages of data, of 15,000 bits each.The assumed cell error rate is 1 in 1,000. The resulting optimal numberof bit errors is 15, and therefore the optimal average bit errors in alogical page is 3.75. The example shows that unless the proposedinnovations are used, a specific logical page might end up with a muchhigher bit error rate—6 bit errors in the example shown. This means thateven though the overall average of bit errors across all bits stored inthe cells is relatively low (15 in 60,000, or 1 in 4,000), unlessspecial measures are taken the ECC circuitry dealing with correctingerrors in a logical page must be designed to handle a relatively highaverage bit error rate (in that example—6 in 15,000, or 1 in 2,500).

A recent US patent application by the inventors of the presentapplication and entitled “METHOD OF ERROR CORRECTION IN MBC FLASHMEMORY” (herein “Litsyn et al.”) discloses a different approach to thesame goal. That patent application is incorporated by reference for allpurposes as if fully set forth herein. Instead of dealing with eachlogical page separately for the purpose of error correction, Litsyn etal. deal with all logical pages sharing the same group of cells at thesame time, treating all bits of all those multiple logical pages as oneECC codeword. This causes the average bit error rate which the ECCcircuitry has to cope with to be lower—only 1 in 4,000 in the exampleabove.

In most ECC implementations all bits are treated the same and no bitsare considered more reliable or less reliable than the average. However,as is evident from the above, when reading multiple logical pages from agroup of MBC flash memory cells, the bits stored in different bit pageshave different error probabilities. Some of the prior art methods foraveraging errors distribution discussed above (Lasser '634, Murin)succeed in causing all logical pages to have the same number of biterrors on average, but different individual bits still have differentreliabilities.

Information about bit error rates of individual bits in a codeword thatis to be error corrected is very useful for an error correction module.We shall demonstrate this using a very simplified example. Assume agroup of four bits protected against a single error by a parity bit,such that if an error is detected the ECC selects one of the bits to beflipped and provides this as the correction result. If all five bits inthe codeword (four data bits and one parity bit) are equally likely tobe in error, then the decision as to which bit to flip upon detecting anerror can only be made at random. This leads to only 20% correctdecisions. But if one of the bits is known to be six times less reliablethan any of the other four bits in the codeword, then selecting that bitto be flipped upon detecting an error results in 60% correct decisions.While this example is extremely simplified and in real-world ECCimplementations the methods of calculation and decision taking are muchmore complicated, it does serve the purpose of demonstrating theusefulness of reliability data for individual bits for improving theperformance of error correction schemes.

There are prior art systems in which extra reliability informationaffects the way ECC circuitry handles different bits. See for exampleU.S. patent application Ser. No. 10/867,645 to Ban et al. filed Jun. 16,2004 and entitled “METHODS OF INCREASING THE RELIABILITY OF A FLASHMEMORY”. In Ban et al. the data stored in a flash cell are read using ahigher resolution than is required for separating the state of a cellinto its possible values. For example, if a cell is written into one of16 states (i.e. the cell stores 4 bits), then the cell is read as if ithad 5 bits. This is called using “fractional levels” by Ban et al. butothers use different terms such as “soft bits”. Others also use morethan one bit of extra reading to provide even a higher resolution. Theextra bits provided by that high resolution reading are used by the ECCmodule for estimating reliability of other “true” data bits, as theyprovide evidence regarding the exact state of a cell compared to theborders separating its state (as it was actually read) from theneighboring states. A cell located near a border is more likely to be inerror than a cell located in the middle of the band and far away fromthe borders. There are also prior art communication systems that utilizethis approach, where sometimes many extra high resolution bits are usedfor improving the error correction performance of a channel.

In all these prior art systems, the extra reliability information isinformation additional to information inherent in just the stored bitsthemselves. Such ECC would be simplified if it could be based only onwhat is inherent in the stored bits themselves. For example, ECC basedon extra reliability information could be implemented without readingthe cells of a MBC flash memory with more resolution than is needed toread the bits stored in the cells.

SUMMARY OF THE INVENTION

The scope of the present invention includes three methods of readingdata stored in an MBC memory, with error correction, based on extrareliability information that is inherent to just the stored data. In thefirst method, the extra reliability information is explicitly a prioriestimates of the reliabilities of the read bits. In the second method,the extra information is implicitly a priori estimates of thereliabilities of the read bits. In the third method, the reliability ofat least some of the read bits is inferred from the values of the readbits.

The ECC of the present invention may be either systematic ornon-systematic. In systematic ECC, the error correction takes theoriginal data bits, appends to them some parity bits, and stores boththe original data bits and the parity bits. Thus, the original data bitsare preserved by the encoding process and can be identified among thestored bits. Later, when the stored bits are read, both the data bitsand the parity bits are read, and the parity bits enable the correctionof errors in the read data bits. In non-systematic ECC, the originaldata bits are not preserved and are not stored. Instead, the encodingprocess transforms the original data bits into a larger group of bits(herein called “protected bits”) that are the bits actually stored. Whenthe stored bits are read, the original bits are regenerated from thestored bits. There is no direct correspondence between a specificoriginal data bit and a specific stored bit.

According to the present invention there is provided a method of readinga plurality of data bits that are stored in a memory that includes aplurality of multi-bit cells, the storing being effected by computing aplurality of parity bits that correspond to the data bits and thenstoring the data bits and the parity bits as stored bits in the cells ofthe memory, with a respective plurality of the stored bits being storedin each of the cells, the method including the steps of: (a) reading thecells, thereby obtaining, for each cell, a respective plurality of readbits; and (b) correcting the read bits that correspond to the data bitsin accordance with the read bits that correspond to the parity bits,wherein the correcting is effected in accordance with a priori estimatesof respective probabilities of at least two of the read bits beingerroneous, wherein at least one estimate is different from at least oneother estimate.

According to the present invention there is provided a computer-readablestorage medium having computer-readable code embodied on thecomputer-readable storage medium, the computer-readable code formanaging a memory that includes a plurality of multi-bit cells andwherein are stored a plurality of data bits, the data bits being storedby computing a plurality of parity bits that correspond to the data bitsand then storing the data bits and the parity bits as stored bits in thecells of the memory, with a respective plurality of the stored bitsbeing stored in each of the cells, the computer-readable code including:(a) program code for reading the cells, thereby obtaining, for eachcell, a respective plurality of read bits; and (b) program code forcorrecting the read bits that correspond to the data bits in accordancewith the read bits that correspond to the parity bits, wherein thecorrecting is effected in accordance with a priori estimates ofrespective probabilities of at least two of the read bits beingerroneous, wherein at least one estimate is different from at least oneother estimate.

According to the present invention there is provided a method of readinga plurality of data bits that are stored in a memory that includes aplurality of multi-bit cells, the storing being effected by computing aplurality of protected bits that correspond to the data bits and thenstoring the protected bits in the cells of the memory, with a respectiveplurality of the protected bits being stored in each of the cells, themethod including the steps of: (a) reading the cells, thereby obtaining,for each cell, a respective plurality of read protected bits; and (b)recovering the data bits from the read protected bits, wherein therecovering is effected in accordance with a priori estimates ofrespective probabilities of at least two of the read protected bitsbeing erroneous, wherein at least one estimate is different from atleast one other estimate.

According to the present invention there is provided a computer-readablestorage medium having computer-readable code embodied on thecomputer-readable storage medium, the computer-readable code formanaging a memory that includes a plurality of multi-bit cells andwherein are stored a plurality of data bits, the data bits being storedby computing a plurality of protected bits that correspond to the databits and then storing the protected bits in the cells of the memory,with a respective plurality of the protected bits being stored in eachof the cells, the computer-readable code including: (a) program code forreading the cells, thereby obtaining, for each cell, a respectiveplurality of read bits; and (b) program code for recovering the databits from the read protected bits, wherein the recovering is effected inaccordance with a priori estimates of respective probabilities of atleast two of the read protected bits being erroneous, wherein at leastone estimate is different from at least one other estimate.

According to the present invention there is provided a method of readinga plurality of data bits that are stored in a memory that includes aplurality of multi-bit cells, the storing being effected by computing aplurality of parity bits that correspond to the data bits and thenstoring the data bits and the parity bits as stored bits in the cells ofthe memory, with a respective plurality of the stored bits being storedin each of the cells, the method including the steps of: (a) reading thecells, thereby obtaining, for each cell, a respective plurality of readbits; and (b) correcting the read bits that correspond to the data bitsin accordance with the read bits that correspond to the parity bits,wherein the correcting is effected in accordance with respectiveprobabilities, of at least two of the read bits being erroneous, thatare based only on at least one aspect of the read bits, the at least oneaspect including an aspect selected from the group consisting ofrespective significances of the read bits and respective bit pages ofthe read bits, wherein at least one probability is different from atleast one other probability.

According to the present invention there is provided a computer-readablestorage medium having computer-readable code embodied on thecomputer-readable storage medium, the computer-readable code formanaging a memory that includes a plurality of multi-bit cells andwherein are stored a plurality of data bits, the data bits being storedby computing a plurality of parity bits that correspond to the data bitsand then storing the data bits and the parity bits as stored bits in thecells of the memory, with a respective plurality of the stored hitsbeing stored in each of the cells, the computer-readable code including:(a) program code for reading the cells, thereby obtaining, for eachcell, a respective plurality of read bits; and (b) program code forcorrecting the read bits that correspond to the data bits in accordancewith the read bits that correspond to the parity bits, wherein thecorrecting is effected in accordance with respective probabilities, ofat least two of the read bits being erroneous, that are based only on atleast one aspect of the read bits, the at least one aspect including anaspect selected from the group consisting of respective significances ofthe read bits and respective bit pages of the read bits, wherein atleast one probability is different from at least one other probability.

According to the present invention there is provided a method of readinga plurality of data bits that are stored in a memory that includes aplurality of multi-bit cells, the storing being effected by computing aplurality of protected bits that correspond to the data bits and thenstoring the protected bits in the cells of the memory, with a respectiveplurality of the protected bits being stored in each of the cells, themethod including the steps of: (a) reading the cells, thereby obtaining,for each cell, a respective plurality of read protected bits; and (b)recovering the data bits from the read protected bits, wherein therecovering is effected in accordance with respective probabilities, ofat least two of the read protected bits being erroneous, that are basedonly on at least one aspect of the read protected bits, the at least oneaspect including an aspect selected from the group consisting ofrespective significances of the read protected bits and respective bitpages of the read protected bits, wherein at least one probability isdifferent from at least one other probability.

According to the present invention there is provided a computer-readablestorage medium having computer-readable code embodied on thecomputer-readable storage medium, the computer-readable code formanaging a memory that includes a plurality of multi-bit cells andwherein are stored a plurality of data bits, the data bits being storedby computing a plurality of protected bits that correspond to the databits and then storing the protected bits in the cells of the memory,with a respective plurality of the protected bits being stored in eachof the cells, the computer-readable code including: (a) program code forreading the cells, thereby obtaining, for each cell, a respectiveplurality of read bits; and (b) program code for recovering the databits from the read protected bits, wherein the recovering is effected inaccordance with respective probabilities, of at least two of the readprotected bits being erroneous, that are based only on at least oneaspect of the read protected bits, the at least one aspect including anaspect selected from the group consisting of respective significances ofthe read protected bits and respective bit pages of the read protectedbits, wherein at least one probability is different from at least oneother probability.

According to the present invention there is provided a method of readinga plurality of data bits that are stored in a memory that includes aplurality of multi-bit cells, the storing being effected by computing aplurality of parity bits that correspond to the data bits and thenstoring the data bits and the parity bits as stored bits in the cells ofthe memory, with a respective plurality of the stored bits being storedin each of the cells, the method including the steps of: (a) reading thecells, thereby obtaining, for each cell, a respective plurality of readbits; and (b) correcting the read bits that correspond to the data bitsin accordance with the read bits that correspond to the parity bits,wherein the correcting is effected in accordance with respectiveprobabilities, of at least two of the read bits being erroneous, thatare based only on respective values of the read bits, wherein at leastone probability is different from at least one other probability.

According to the present invention there is provided a computer-readablestorage medium having computer-readable code embodied on thecomputer-readable storage medium, the computer-readable code formanaging a memory that includes a plurality of multi-bit cells andwherein are stored a plurality of data bits, the data bits being storedby computing a plurality of parity bits that correspond to the data bitsand then storing the data bits and the parity bits as stored bits in thecells of the memory, with a respective plurality of the stored bitsbeing stored in each of the cells, the computer-readable code including:(a) program code for reading the cells, thereby obtaining, for eachcell, a respective plurality of read bits; and (b) program code forcorrecting the read bits that correspond to the data bits in accordancewith the read bits that correspond to the parity bits, wherein thecorrecting is effected in accordance with respective probabilities, ofat least two of the read bits being erroneous, that are based only onrespective values of the read bits, wherein at least one probability isdifferent from at least one other probability.

According to the present invention there is provided a method of readinga plurality of data bits that are stored in a memory that includes aplurality of multi-bit cells, the storing being effected by computing aplurality of protected bits that correspond to the data bits and thenstoring the protected bits in the cells of the memory, with a respectiveplurality of the protected bits being stored in each of the cells, themethod including the steps of: (a) reading the cells, thereby obtaining,for each cell, a respective plurality of read protected bits; and (b)recovering the data bits from the read protected bits, wherein therecovering is effected in accordance with respective probabilities, ofat least two of the read protected bits being erroneous, that are basedonly on respective values of the read protected bits, wherein at leastone probability is different from at least one other probability.

According to the present invention there is provided a computer-readablestorage medium having computer-readable code embodied on thecomputer-readable storage medium, the computer-readable code formanaging a memory that includes a plurality of multi-bit cells andwherein are stored a plurality of data bits, the data bits being storedby computing a plurality of protected bits that correspond to the databits and then storing the protected bits in the cells of the memory,with a respective plurality of the protected bits being stored in eachof the cells, the computer-readable code including: (a) program code forreading the cells, thereby obtaining, for each cell, a respectiveplurality of read protected bits; and (d) program code for recoveringthe data bits from the read protected bits, wherein the recovering iseffected in accordance with respective probabilities, of at least two ofthe read protected bits being erroneous, that are based only onrespective values of the read protected bits, wherein at least oneprobability is different from at least one other probability.

A first embodiment of the methods of the present invention is directedat correcting data stored in a MBC memory using systematic ECC. A secondembodiment of the methods of the present invention is directed atcorrecting data stored in a MBC memory using non-systematic ECC. In bothembodiments of both methods, the first step is reading the stored bits,thereby obtaining, for each cell in which relevant bits are stored, arespective plurality of “read” bits. Because of errors in reading thecells, a cell's “read” bits may not be identical to the bits that werestored in the cell. It is precisely this potential discrepancy betweenthe read bits and the stored bits that ECC is intended to overcome.

In the first embodiment of the first method of the present invention;the read bits that correspond to the data bits are corrected accordingto the read bits that correspond to the parity bits. This correctiontakes into account a priori estimates of the probabilities that two ormore of the read bits are erroneous, with not all the estimates beingequal.

In the second embodiment of the first method of the present invention,the data bits are recovered from the read protected bits. This recoverytakes into account a priori estimates of the probabilities that two ormore of the read bits are erroneous, with not all the estimates beingequal.

In the first embodiment of the second method of the present invention,the read bits that correspond to the data bits are corrected accordingto the read bits that correspond to the parity bits. This correctiontakes into account probabilities, that two or more of the read bits areerroneous, that are based only on at least one aspect of the read bits,with not all the probabilities being equal. The aspect(s) of the readbits that is/are used to estimate these probabilities must includeeither the significances of the read bits or the bit pages of the readbits or both.

In the second embodiment of the second method of the present invention,the data bits are recovered from read protected bits. This recoverytakes into account probabilities, that two or more of the read protectedbits are erroneous, that are based only on at least one aspect of theread protected bits, with not all the probabilities being equal. Theaspect(s) of the read protected bits that is/are used to estimate theseprobabilities must include either the significances of the read bits orthe bit pages of the read bits or both.

In the first embodiment of the third method of the present invention,the read bits that correspond to the data bits are corrected accordingto the read bits that correspond to the parity bits. This correctiontakes into account probabilities, that two or more of the read bits areerroneous, that are based only on the values of the read bits, with notall the probabilities being equal.

In the second embodiment of the third method of the present invention,the data bits are recovered from read protected bits. This recoverytakes into account probabilities, that two or more of the read protectedbits are erroneous, that are based only on the values of the readprotected bits, with not all the probabilities being equal.

Preferably, in the first method of the present invention, at least twoof the a priori estimates are for read bits, or for read protected bits,of a common one of the cells. Alternatively, at least two of the apriori estimates are for read bits, or for read protected bits, ofdifferent cells.

Preferably, in the first method of the present invention, the a prioriprobabilities depend on the significances of the relevant bits. The“sigificance” of a bit stored in a MBC cell is the position of the bitin the binary number that is stored in the MBC cell. For example, a MBCcell that stores four bits stores a binary number, between 0 and 15,that has four bits: a least significant bit, a next-to-leas significantbit, a next-to-most significant bit and a most significant bit.Alternatively, the a priori probabilities depend on the bit pages of therelevant bits. It is common practice in a MBC flash memory for all thebits of a common significance to be grouped in the same logical bitpage(s), in which case these two dependencies of the a prioriprobabilities are equivalent.

The scope of the present invention also includes a controller, for a MBCmemory, that recovers data stored in the memory using one of the methodsof the present invention, a memory device that includes a MBC memory anda controller of the present invention, and a computer-readable storagemedium having embodied thereon computer-readable code for managing amemory according to one of the methods of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention is herein described, by way of example only, withreference to the accompanying drawings, wherein:

FIGS. 1A-1D show threshold voltage distributions in a one-bit flashcell, a two-bit flash cell, a three-bit flash cell and a four-bit flashcell;

FIG. 2 is a high-level block diagram of a flash memory device of thepresent invention; and

FIG. 3 is a high-level partial block diagram of a data storage system ofthe present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention is of a method of error correction, for amulti-bit-per-cell memory, that takes advantage of knowledge ofprobabilities of the various bits stored in each cell of being in error.

The principles and operation of error correction according to thepresent invention may be better understood with reference to thedrawings and the accompanying description.

The first two methods of the present invention are improved methods forcorrecting errors in data read from an MBC flash memory device,utilizing reliability information derived from the locations in whichindividual bits are stored within the cells of the device (e.g., in thecase of a MBC flash memory device in which the bits of each cell belongto different pages, in which bit pages the individual bits are stored).The third method of the present invention is an improved method forcorrecting errors in data read from an MBC flash memory device, usingreliability information derived from correlation between different bitssharing a common cell. The proposed methods are applicable to cases inwhich the ECC codeword used in the correction process contains multiplebits that reside in a shared cell. This is always the case when themethods of Litsyn et al. are employed for correcting errors in data readfrom MBC flash devices.

In the first two methods of the present invention, advantage is taken ofthe fact that the physical storage location of each bit is known, andconsequently its expected error rate is also known (note that the terms“error rate of a bit” and “reliability of a bit” are used here as twoopposite aspects of the same feature, and therefore are usedinterchangeably for referring to the same characteristic). Consequently,the ECC module takes advantage of this information by assigning each bitan initial, a priori probability of error that serves as a startingpoint to the ECC calculations and decisions. The invention is notlimited to any specific ECC scheme or algorithm—there are many ECCalgorithms known in the prior art that can take advantage of suchinitial starting point and provide a better error correction in terms ofprobability of success, time to converge or other factors of success.

In particular, the first two methods of the present invention areintended for use with “soft” decoding algorithms. Such algorithms aredescribed e.g. in George C. Clark, Jr. and J. Bibb Cain, ErrorCorrection Coding for Digital Communications (Springer, 1981), in S. Linand D. J. Costello, Error Control Coding: Fundamentals and Applications(Prentice-Hall, 1983) and in Branka Vucetic and Jinhong Yuan, TurboCodes Principles and Applications (Kluwer, 2000). Although thesereferences are directed at the use of soft ECC algorithms incommunications, it will be clear to those skilled in the art how toadapt those algorithms to error correction in multi-bit-per-cellmemories.

These methods differ from the prior art methods mentioned above in whichextra information is derived from reading the cells with higherresolution. In the present invention the different reliability valuesare determined prior to reading the data and are not dependent on theactual values of the data read. This is not the case in the above priorart methods. In other words, the present invention is capable of usinga-priori probabilities of error for individual bit positions, even ifsuch probabilities cannot be derived from the actual data, while priorart systems are dependent upon the ability to extract such probabilitiesfrom the actual data. The present invention makes use of probabilitiesthat can be supplied, for example, by the vendor of the flash. Oneadvantage of this a priori probability is that the present invention issimpler to implement than the prior art methods. Unlike those methods,the present invention does not need to extract and manipulate additionalbits on top of the stored bits.

For example, consider the four-bit-per-cell bit ordering {15, 14, 12,13, 9, 8, 10, 11, 3, 2, 0, 4, 6, 7, 5, 1} that is discussed in Lasser'634 and in Murin. (This is the bit ordering that is illustrated in FIG.1D.) As shown in those patent applications, the lowest-order bit is sixtimes as likely as the highest-order bit to be in error, thesecond-lowest-order bit is five times as likely as the highest-order bitto be in error, and the second-highest-order bit is three times aslikely as the highest-order bit to be in error. In a group of 15,000four-bit-per-cell MBC cells that is used to store four logical pages ofdata, with an assumed cell error rate of 1 in 1,000, the lowest-orderbit of each cell has an a priori error probability of 6/15,000=2/5,000,the second-lowest-order bit of each cell has an a priori errorprobability of 5/15,000=1/3,000, the second-highest-order bit of eachcell has an a priori error probability of 3/15,000=1/5,000 and thehighest-order bit of each cell has an a priori error probability of1/15,000.

In this example, the a priori error probabilities of the bits arefunctions only of the significances of the bits. All the bits in thesame bit page have the same a priori probability of being in error. Moregenerally, it is possible for some bits of a bit page to have differenta priori error probabilities than other bits of the same bit page.

In the third method of the present invention, advantage is taken of thefact that in addition to reliability information derived from a bit'slocation in the physical page bits of MBC cells, there is another sourceof information that may be utilized by an ECC module. Contrary to thecase where each bit of an ECC codeword originates from a different cell,where there is no correlation between the errors of different bits, inthe case there are in the codeword multiple bits originating from thesame cell (as is the case in the method of Litsyn et al.), we may deducefrom the value of one bit about values of other bits in the same cell.As not all erroneous state transitions in a flash cell are equallyprobable, deductions can be made from one bit to another.

Consider, for example, the four-bit-per-cell bit ordering {15, 14, 12,13, 9, 8, 10, 11, 3, 2, 0, 4, 6, 7, 5, 1}. Suppose that the decoding ofthe cells is done sequential, from the most significant bit to the leastsignificant bit. Suppose that the three most significant bits of a cellhave been read as “100” and have been corrected to “101” by the ECCalgorithm. The only way that this could have happened with a shift ofonly one threshold voltage range is if the cell was written as 10(binary 1010) and read as 8 (binary 1000). The alternatives are:

-   -   The cell was written as 10 (binary 1010) and read as 9 (binary        1001), a shift of two threshold voltage ranges.    -   The cell was written as 11 (binary 1011) and read as 8 (binary        1000), a shift of two threshold voltage ranges.    -   The cell was written as 11 binary 1011) and read as 9 (binary        1001), a shift of three threshold voltage ranges.        This implies that the odds of the least significant bit being        “0” are much higher than the odds of the least significant bit        being “1”.

This method also differs from the prior art methods mentioned above inwhich extra information is derived from reading the cells with higherresolution. In the present invention the only bits that are input intothe ECC module are the data bits and their corresponding parity bits. Noother data-dependent inputs (in contrast to predeterminednon-data-dependent inputs) is provided to the ECC module for performingits correction process. This is not the case in the above prior artmethods, where extra bits of higher precision are generated from thecells and provided to the ECC module as auxiliary inputs.

The scope of the present invention also includes the more general casein which only some but not all of the bits in the codeword are assignedinitial probabilities that are different from the average. It alsoincludes the more general case in which the correlation effects betweenbits sharing cells are only taken into account for some but not all ofthe cells.

So far, the present invention has been presented in the context of errorcorrection schemes that are “systematic”. As noted above, in systematicerror correction coding, the original data bits are preserved by theencoding process and can be identified within the bits stored. In otherwords, the error correction mechanism takes the original data bits, addsto them some parity bits, and stores both data bits and parity bits.Later, when reading the stored bits, both the data bits and the paritybits are read, and the parity bits enable the correction of errors inthe read data bits, thus generating the original data bits.

However, the present invention is equally applicable to non-systematicerror correction codes. As noted above, in such codes the original databits are not preserved and are not stored. Instead, the encoding processtransforms the original data bits into a larger group of bits that arethe bits actually stored. When reading the stored protected data bitsthe original data bits are re-generated, even if there are errors in theprotected data bits. The defining characteristic of non-systematic codesis that there is no direct correspondence between a specific originaldata bit and a specific stored bit. An original data bit is “scattered”in multiple stored bits, and only the combination of those multiplestored bits tells the value of the original bit.

The scope of the present invention includes methods for reading databits from an MBC flash memory device, as described above. The scope ofthe present invention also includes a flash memory controller that readsfrom an array of MBC flash memory cells according to the above methods.The scope of the invention also includes a flash memory device thatcombines an array of MBC flash memory cells with a flash memorycontroller that reads from the array according to the above methods.

Referring again to the drawings, FIG. 2 is a high-level block diagram ofa flash memory device 20 of the present invention, coupled to a host 30.FIG. 2 is adapted from FIG. 1 of Ban, U.S. Pat. No. 5,404,485, whichpatent is incorporated by reference for all purposes as if fully setforth herein. Flash memory device 20 includes a flash memory 24, acontroller 22 and a random access memory (RAM) 26. Controller 22, thatcorresponds to “flash control 14” of U.S. Pat. No. 5,404,485, managesflash memory 24, with the help of RAM 26, as described in U.S. Pat. No.5,404,485. Flash memory 24 encodes data, two or more bits per cell offlash memory 24, as described in U.S. Pat. No. 6,522,580 or in U.S. Pat.No. 6,643,188. When reading the data, controller 22 applies errorcorrection as described above.

FIG. 3 is a high-level partial block diagram of an alternative datastorage system 50 of the present invention. Data storage system 50includes a processor 52 and four memory devices: a RAM 54, a boot ROM56, a mass storage device (hard disk) 58 and a flash memory device 40,all communicating via a common bus 60. Like flash memory device 20,flash memory device 40 includes a flash memory 42. Unlike flash memorydevice 20, flash memory device 40 lacks its own controller and RAM.Instead, processor 52 emulates controller 22 by executing a softwaredriver that implements the methodology of U.S. Pat. No. 5,404,485 in themanner e.g. of the TrueFFS™ driver of M-Systems Flash Disk Pioneers Ltd.of Kfar Saba, Israel. Flash memory 42 encodes data, two or more bits percell of flash memory 42, as described in U.S. Pat. No. 6,522,580 or inU.S. Pat. No. 6,643,188. When reading the data, processor 52 applieserror correction as described above. Flash memory device 40 alsoincludes a bus interface 44 to enable processor 52 to communicate withflash memory 42.

The code of the software driver that processor 52 executes to manageflash memory 42 is stored in mass storage device 58 and is transferredto RAM 54 for execution. Mass storage device 58 thus is an example of acomputer-readable code storage medium in which is embedded computerreadable code for managing flash memory 42 according to the principlesof the present invention.

While the invention has been described with respect to a limited numberof embodiments, it will be appreciated that many variations,modifications and other applications of the invention may be made.

1. A method of reading a plurality of data bits that are stored in amemory that includes a plurality of multi-bit cells, the storing beingeffected by computing a plurality of parity bits that correspond to thedata bits and then storing the data bits and the parity bits as storedbits in the cells of the memory, with a respective plurality of thestored bits being stored in each of the cells, the method comprising thesteps of: (a) reading the cells, thereby obtaining, for each cell, arespective plurality of read bits; and (b) correcting said read bitsthat correspond to the data bits in accordance with said read bits thatcorrespond to the parity bits, wherein said correcting is effected inaccordance with respective probabilities, of at least two of said readbits being erroneous, that are based only on at least one aspect of saidread bits, said at least one aspect including an aspect selected fromthe group consisting of respective significances of said read bits andrespective bit pages of said read bits, wherein at least one saidprobability is different from at least one other said probability.
 2. Acontroller, for a memory that includes a plurality of multi-bit cells,that reads data stored in the memory using the method of claim
 1. 3. Amemory device comprising: (a) a memory that includes a plurality ofmulti-bit cells; and (b) the controller of claim 2 for controlling saidmemory.
 4. A computer-readable storage medium having computer-readablecode embodied on the computer-readable storage medium, thecomputer-readable code for managing a memory that includes a pluralityof multi-bit cells and wherein are stored a plurality of data bits, thedata bits being stored by computing a plurality of parity bits thatcorrespond to the data bits and then storing the data bits and theparity bits as stored bits in the cells of the memory, with a respectiveplurality of the stored bits being stored in each of the cells, thecomputer-readable code comprising: (a) program code for reading thecells, thereby obtaining, for each cell, a respective plurality of readbits; and (b) program code for correcting said read bits that correspondto the data bits in accordance with said read bits that correspond tothe parity bits, wherein said correcting is effected in accordance withrespective probabilities, of at least two of said read bits beingerroneous, that are based only on at least one aspect of said read bits,said at least one aspect including an aspect selected from the groupconsisting of respective significances of said read bits and respectivebit pages of said read bits, wherein at least one said probability isdifferent from at least one other said probability.
 5. A method ofreading a plurality of data bits that are stored in a memory thatincludes a plurality of multi-bit cells, the storing being effected bycomputing a plurality of protected bits that correspond to the data bitsand then storing the protected bits in the cells of the memory, with arespective plurality of the protected bits being stored in each of thecells, the method comprising the steps of: (a) reading the cells,thereby obtaining, for each cell, a respective plurality of readprotected bits; and (b) recovering the data bits from the read protectedbits, wherein said recovering is effected in accordance with respectiveprobabilities, of at least two of said read protected bits beingerroneous, that are based only on at least one aspect of said readprotected bits, said at least one aspect including an aspect selectedfrom the group consisting of respective significances of said readprotected bits and respective bit pages of said read protected bits,wherein at least one said probability is different from at least oneother said probability.
 6. A controller, for a memory that includes aplurality of multi-bit cells, that reads data stored in the memory usingthe method of claim
 5. 7. A memory device comprising: (a) a memory thatincludes a plurality of multi-bit cells; and (b) the controller of claim6 for controlling said memory.
 8. A computer-readable storage mediumhaving computer-readable code embodied on the computer-readable storagemedium, the computer-readable code for managing a memory that includes aplurality of multi-bit cells and wherein are stored a plurality of databits, the data bits being stored by computing a plurality of protectedbits that correspond to the data bits and then storing the protectedbits in the cells of the memory, with a respective plurality of theprotected bits being stored in each of the cells, the computer-readablecode comprising: (a) program code for reading the cells, therebyobtaining, for each cell, a respective plurality of read protected bits;and (d) program code for recovering the data bits from said readprotected bits, wherein said recovering is effected in accordance withrespective probabilities, of at least two of said read protected bitsbeing erroneous, that are based only on at least one aspect of said readprotected bits, said at least one aspect including an aspect selectedfrom the group consisting of respective significances of said readprotected bits and respective bit pages of said read protected bits,wherein at least one said probability is different from at least oneother said probability.